//
//  LeftPadding.m
//  JogMobile
//
//  Created by Pedro Gonzalez on 6/2/12.
//  Copyright (c) 2012 __MyCompanyName__. All rights reserved.
//

#import "LeftPadding.h"

@implementation NSString (LeftPadding)

- (NSString *) stringByPaddingTheLeftToLength:(NSUInteger) newLength withString:(NSString *) padString startingAtIndex:(NSUInteger) padIndex
{
    NSString *aString = self;
    int i = (int)(aString.length/16);
    int lunghezza = (i+1)*16;
    newLength = lunghezza;

    return [[@"" stringByPaddingToLength:newLength - [aString length] withString:padString startingAtIndex:padIndex] stringByAppendingString:aString];

}

@end